mod json;

use crate::json::Json;
use crate::json::parser::Parser;

fn main() {
    let mut p1 = Parser::new();
    let v1 = p1.load("{\"key1\":10,\"key2\":false,\"key3\":null,\"key4\":1.1,\"key5\":\"hello\",\"key6\":[10,true,false,null,\"hello\",1.1],\"key7\":{\"key1\":10,\"key2\":false,\"key3\":null,\"key4\":1.1,\"key5\":\"hello\"}}").unwrap();
    let Json::Object(ref tv1) = v1 else { panic!("error") };
    let Json::Object(ref tv7) = tv1.get("key7").unwrap() else { panic!("error") };
    println!("{:?}", tv7);
    let Json::Array(ref tv6) = tv1.get("key6").unwrap()else { panic!("error") };
    println!("{:?}", tv6);
}
